import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/index',
      name: 'index',
      component: () => import('./views/index.vue'),
      children: [{
          path: '/goods',
          name: 'goods',
          component: () => import('@/components/goods.vue')
        },
        {
          path: '/evaluate',
          name: 'evaluate',
          component: () => import('@/components/evaluate.vue')
        },
        {
          path: '/shop',
          name: 'shop',
          component: () => import('@/components/shop.vue')
        },
      ]
    },
    {
      path: '/',
      redirect: '/index'
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import( './views/About.vue')
    // }
  ]
})